// Package svc
// @Author zhongxc
// @Date 2024/5/10 18:02:00
// @Desc
package svc

import (
	"project-common/msdb"
	"project-user/config"
	"project-user/pkg/database"
)

type ServiceContext struct {
	Config *config.Config
	Db     *msdb.MsDB
}

func NewServiceContext(cnf *config.Config) *ServiceContext {
	return &ServiceContext{
		Config: cnf,
		Db:     database.ConnMysql(cnf.MysqlConfig.Dsn),
	}
}
